package com.gmsk.pocket.entity;

public class DataWrapper<T> {

    public static final Integer OK = 200;
    public static final Integer ERROR = 400;
    public static final Integer INNER_ERROR = 500; //内部错误
    public static final Integer NOT_EXIST = 10000; // 不存在
    public static final Integer PARMAS_ERROR = 10001; // 参数错误

    public DataWrapper() {
    }

    public DataWrapper(T data) {
        this.code = OK;
        this.msg = "";
        this.data = data;
    }

    public DataWrapper(Integer code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public DataWrapper(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private Integer code;
    private String msg;
    private T data;


    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }


}
